/**
 * 路由相关类型定义
 */

/**
 * 路由守卫函数类型
 */
export type RouteGuard = (to: string, from: string) => boolean | Promise<boolean>

/**
 * 路由跳转选项
 */
export interface NavigateOptions {
  replace?: boolean
  state?: any
}

/**
 * 路由配置项
 */
export interface RouteConfig {
  path: string
  component?: React.ComponentType<any>
  children?: RouteConfig[]
  meta?: RouteMeta
  guard?: RouteGuard
}

/**
 * 路由元信息
 */
export interface RouteMeta {
  title?: string
  requireAuth?: boolean
  icon?: string
  hideInMenu?: boolean
  roles?: string[]
}

